package 曾世昌12_8.zuoye3;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class demo {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName( "rc.mxdx3_zhoumozuoye.zuoye3.Dog" );
        Method cell = aClass.getDeclaredMethod( "cell" );
        Method sleep = aClass.getDeclaredMethod( "sleep");
        cell.setAccessible( true );
        sleep.setAccessible( true );
        Constructor<?> deds = aClass.getConstructor();
        Object o = deds.newInstance();
        cell.invoke( o ,null);
        sleep.invoke( o ,null);

    }
}
